Hello everyone !

I have got an application that needs to be set up with macdeployqt, but when I call it, it tells me that it cannot find some libs into /usr/lib/ directory.

Before calling macdeployqt I have to insert 3 libs (.tx) into my .app. I used otool command to view the dependencies and here is the output of one of them :

Qt Code:
  1. RecomputeDimBlock.tx:
  2. RecomputeDimBlock.tx (compatibility version 0.0.0, current version 0.0.0)
  3. /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
  4. /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1404.0.0)
  5. libTD_Db.dylib (compatibility version 0.0.0, current version 0.0.0)
  6. libTD_DbRoot.dylib (compatibility version 0.0.0, current version 0.0.0)
  7. libTD_Ge.dylib (compatibility version 0.0.0, current version 0.0.0)
  8. libTD_Root.dylib (compatibility version 0.0.0, current version 0.0.0)
  9. libTD_Alloc.dylib (compatibility version 0.0.0, current version 0.0.0)
  10. libTD_Gi.dylib (compatibility version 0.0.0, current version 0.0.0)
  11. libTD_SpatialIndex.dylib (compatibility version 0.0.0, current version 0.0.0)
  12. libsisl.dylib (compatibility version 0.0.0, current version 0.0.0)
  13. /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
  14. /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
To copy to clipboard, switch view to plain text mode 

I also insert every "libTD_xx" with my tx. And then, I relink those libs. I have made a bash script to automate those steps :

Qt Code:
  1. #!/bin/bash
  2.  
  3. if [ ! -e build/debug/MediaCad.app ]
  4. then
  5. echo MediaCad.app non trouvé dans build/debug/
  6. echo Sortie du script
  7. exit 1
  8. fi
  9. #Création du dossier « tx » dans le .app s’il n’existe pas
  10. if [ ! -d build/debug/MediaCad.app/Contents/tx ]
  11. then
  12. mkdir -p build/debug/MediaCad.app/Contents/tx
  13. fi
  14.  
  15.  
  16. #placement des tx et des libs dans le .app
  17. for tx in RecomputeDimBlock.tx PlotSettingsValidator.tx ThreadPool.tx libTD_Db.dylib libTD_DbRoot.dylib libTD_Gi.dylib libTD_SpatialIndex.dylib libTD_Ge.dylib libTD_Root.dylib libsisl.dylib libTD_Alloc.dylib
  18. do
  19. if [ -e tx/$tx ]
  20. then
  21. echo Copie de $tx dans l’application
  22. cp tx/$tx build/debug/MediaCad.app/Contents/tx
  23. else
  24. echo Impossible de trouver le fichier $tx dans tx/
  25. echo Sortie du script
  26. exit 1
  27. fi
  28. done
  29.  
  30.  
  31. #installation des libs
  32. cd tx/
  33. for lib in libTD_Db.dylib libTD_DbRoot.dylib libTD_Gi.dylib libTD_SpatialIndex.dylib libTD_Ge.dylib libTD_Root.dylib libsisl.dylib libTD_Alloc.dylib
  34. do
  35. echo Installation de $lib
  36. install_name_tool -id $lib ../build/debug/MediaCad.app/Contents/tx/$lib
  37. install_name_tool -change $lib @executable_path/../tx/$lib ../build/debug/MediaCad.app/Contents/MacOS/MediaCad
  38. done
  39.  
  40.  
  41. #Actualisation des dépendances
  42. for tx in RecomputeDimBlock.tx PlotSettingsValidator.tx ThreadPool.tx
  43. do
  44. for lib in libTD_Db.dylib libTD_DbRoot.dylib libTD_Gi.dylib libTD_SpatialIndex.dylib libTD_Ge.dylib libTD_Root.dylib libsisl.dylib libTD_Alloc.dylib
  45. do
  46. echo Actualisation de $lib pour $tx
  47. install_name_tool -change $lib @executable_path/../tx/$lib ../build/debug/MediaCad.app/Contents/tx/$tx
  48. done
  49. done
  50. cd ..
  51.  
  52. #génération du .app
  53. echo Début de la construction de l’application
  54. /Users/developpement/Qt/5.7/clang_64/bin/macdeployqt build/debug/MediaCad.app
  55. echo Application construite
To copy to clipboard, switch view to plain text mode 

When I execute my script, everything works fine except macdeployqt. Here is the output :

Qt Code:
  1. ERROR: no file at "/usr/lib/libTD_Alloc.dylib"
  2. ERROR: no file at "/usr/lib/libTD_DbRoot.dylib"
  3. ERROR: no file at "/usr/lib/libTD_Gi.dylib"
  4. ERROR: no file at "/usr/lib/libTD_Ge.dylib"
  5. ERROR: no file at "/usr/lib/libTD_Root.dylib"
  6. ERROR: no file at "/usr/lib/libTD_SpatialIndex.dylib"
  7. ERROR: no file at "/usr/lib/libsisl.dylib"
To copy to clipboard, switch view to plain text mode 

Those libs are the ones that I copied inside my .app at the beginning.

I presume that I'm doing something wrong with install_name_tool but I can't see where ? I have spent 3 days on it so that's why I asking my question here. One last thing, I work with OS X 10.11 and Qt 5.7.

If something is not clear do not hesitate to tell me, I know my english is not perfect

Thank you !